home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / ds5000.md / RCS / setjmp.h,v < prev    next >
Encoding:
Text File  |  1991-07-16  |  5.2 KB  |  174 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     91.07.16.12.06.02;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     89.07.08.14.56.05;  author nelson;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @Add function prototypes.
  27. @
  28. text
  29. @/*    @@(#)setjmp.h    4.5    (ULTRIX)    12/16/88                    */
  30. /* $Header$ */
  31. /************************************************************************
  32.  *                                    *
  33.  *            Copyright (c) 1985,1987,1988  by        *
  34.  *        Digital Equipment Corporation, Maynard, MA        *
  35.  *            All rights reserved.                *
  36.  *                                    *
  37.  *   This software is furnished under a license and may be used and    *
  38.  *   copied  only  in accordance with the terms of such license and    *
  39.  *   with the  inclusion  of  the  above  copyright  notice.   This    *
  40.  *   software  or  any  other copies thereof may not be provided or    *
  41.  *   otherwise made available to any other person.  No title to and    *
  42.  *   ownership of the software is hereby transferred.            *
  43.  *                                    *
  44.  *   This software is  derived  from  software  received  from  the    *
  45.  *   University    of   California,   Berkeley,   and   from   Bell    *
  46.  *   Laboratories.  Use, duplication, or disclosure is  subject  to    *
  47.  *   restrictions  under  license  agreements  with  University  of    *
  48.  *   California and with AT&T.                        *
  49.  *                                    *
  50.  *   The information in this software is subject to change  without    *
  51.  *   notice  and should not be construed as a commitment by Digital    *
  52.  *   Equipment Corporation.                        *
  53.  *                                    *
  54.  *   Digital assumes no responsibility for the use  or  reliability    *
  55.  *   of its software on equipment which is not supplied by Digital.    *
  56.  *                                    *
  57.  ************************************************************************/
  58. /************************************************************************
  59.  *            Modification History                *
  60.  *                                    *
  61.  *    David L Ballenger, 28-Mar-1985                    *
  62.  * 0001    Add defintions for System V compatibility            *
  63.  *                                    *
  64.  ************************************************************************/
  65.  
  66. #ifndef _SETJMP
  67. #define _SETJMP
  68.  
  69. #include <cfuncproto.h>
  70.  
  71. /*
  72.  * jmp_buf offsets
  73.  * This should really just be a struct sigcontext, but for historical
  74.  * reasons ....
  75.  * NOTE: THIS MUST MATCH the initial portion of struct sigcontext,
  76.  *    sc_onsigstk, sc_sigmask, sc_pc, sc_regs, sc_mdlo, sc_mdhi,
  77.  *    fpregs, and fpc_csr
  78.  * must lie at offset equal to the corresponding entries in the jmp_buf
  79.  * since longjmp performs a sigcleanup.
  80.  * See libc routines setjmp/longjmp/sigvec, and kernel routines
  81.  * sendsig/sigcleanup.
  82.  */
  83. #define    JB_ONSIGSTK    0        /* onsigstack flag */
  84. #define    JB_SIGMASK    1        /* signal mask */
  85. #define    JB_PC        2        /* program counter */
  86. #define    JB_REGS        3        /* registers */
  87. #define    JB_ZERO        (JB_REGS+0)    /* register zero */
  88. #define    JB_MAGIC    (JB_ZERO)    /* magic number saved at reg 0 */
  89. #define    JB_AT        (JB_REGS+1)    /* AT */
  90. #define    JB_V0        (JB_REGS+2)    /* function result regs */
  91. #define    JB_V1        (JB_REGS+3)
  92. #define    JB_A0        (JB_REGS+4)    /* argument regs */
  93. #define    JB_A1        (JB_REGS+5)
  94. #define    JB_A2        (JB_REGS+6)
  95. #define    JB_A3        (JB_REGS+7)
  96. #define    JB_T0        (JB_REGS+8)    /* caller saved regs */
  97. #define    JB_T1        (JB_REGS+9)
  98. #define    JB_T2        (JB_REGS+10)
  99. #define    JB_T3        (JB_REGS+11)
  100. #define    JB_T4        (JB_REGS+12)
  101. #define    JB_T5        (JB_REGS+13)
  102. #define    JB_T6        (JB_REGS+14)
  103. #define    JB_T7        (JB_REGS+15)
  104. #define    JB_S0        (JB_REGS+16)    /* callee saved regs */
  105. #define    JB_S1        (JB_REGS+17)
  106. #define    JB_S2        (JB_REGS+18)
  107. #define    JB_S3        (JB_REGS+19)
  108. #define    JB_S4        (JB_REGS+20)
  109. #define    JB_S5        (JB_REGS+21)
  110. #define    JB_S6        (JB_REGS+22)
  111. #define    JB_S7        (JB_REGS+23)
  112. #define    JB_T8        (JB_REGS+24)    /* temps */
  113. #define    JB_T9        (JB_REGS+25)
  114. #define    JB_K0        (JB_REGS+26)    /* kernel regs */
  115. #define    JB_K1        (JB_REGS+27)
  116. #define    JB_GP        (JB_REGS+28)    /* frame pointer */
  117. #define    JB_SP        (JB_REGS+29)    /* stack pointer */
  118. #define    JB_S8        (JB_REGS+30)    /* another callee saved */
  119. #define    JB_RA        (JB_REGS+31)    /* return address */
  120.  
  121. #define    JB_FREGS    38        /* floating-point registers */
  122. #define    JB_F0        (JB_FREGS+0)    /* function result regs */
  123. #define    JB_F1        (JB_FREGS+1)
  124. #define    JB_F2        (JB_FREGS+2)
  125. #define    JB_F3        (JB_FREGS+3)
  126. #define    JB_F4        (JB_FREGS+4)    /* caller save regs */
  127. #define    JB_F5        (JB_FREGS+5)
  128. #define    JB_F6        (JB_FREGS+6)
  129. #define    JB_F7        (JB_FREGS+7)
  130. #define    JB_F8        (JB_FREGS+8)
  131. #define    JB_F9        (JB_FREGS+9)
  132. #define    JB_F10        (JB_FREGS+10)
  133. #define    JB_F11        (JB_FREGS+11)
  134. #define    JB_F12        (JB_FREGS+12)    /* argument regs */
  135. #define    JB_F13        (JB_FREGS+13)
  136. #define    JB_F14        (JB_FREGS+14)
  137. #define    JB_F15        (JB_FREGS+15)
  138. #define    JB_F16        (JB_FREGS+16)    /* caller save regs */
  139. #define    JB_F17        (JB_FREGS+17)
  140. #define    JB_F18        (JB_FREGS+18)
  141. #define    JB_F19        (JB_FREGS+19)
  142. #define    JB_F20        (JB_FREGS+20)    /* callee save regs */
  143. #define    JB_F21        (JB_FREGS+21)
  144. #define    JB_F22        (JB_FREGS+22)
  145. #define    JB_F23        (JB_FREGS+23)
  146. #define    JB_F24        (JB_FREGS+24)
  147. #define    JB_F25        (JB_FREGS+25)
  148. #define    JB_F26        (JB_FREGS+26)
  149. #define    JB_F27        (JB_FREGS+27)
  150. #define    JB_F28        (JB_FREGS+28)
  151. #define    JB_F29        (JB_FREGS+29)
  152. #define    JB_F30        (JB_FREGS+30)
  153. #define    JB_F31        (JB_FREGS+31)
  154. #define JB_FPC_CSR    (JB_FREGS+32)    /* fp control and status register */
  155.  
  156. typedef    int    jmp_buf[JB_FPC_CSR + 1];
  157.  
  158. extern int setjmp _ARGS_((jmp_buf));
  159. extern void longjmp _ARGS_((jmp_buf, int));
  160.  
  161. #endif /* _SETJMP */
  162. @
  163.  
  164.  
  165. 1.1
  166. log
  167. @Initial revision
  168. @
  169. text
  170. @d2 1
  171. d38 5
  172. d129 5
  173. @
  174.